package com.scf.user.controller;

import com.scf.uitl.ResponseResult;
import com.scf.user.entity.User;
import com.scf.user.service.UserService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author author
 * @create 2021-11-11-9:35
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Resource
    UserService userService;

    FileController fileController;
    @PostMapping("/getUser")
    public User getUser(@RequestBody User user){
        User getUser = userService.getUser(user);
        if(getUser!=null){
            User treeMenu = userService.getTreeMenu(getUser.getUid());
            return treeMenu;
        }

        return getUser;
    }
}
